﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace PersonaLibrary.View.JobEmploeeRelationView
{
    /// <summary>
    /// Interaction logic for OrganizationDepartmentEmployeeView.xaml
    /// </summary>
    public partial class OrganizationDepartmentEmployeeView : Window, IView
    {
        public OrganizationDepartmentEmployeeView()
        {
            InitializeComponent();
			Keyboard.AddKeyDownHandler(this, OnKeyDownHandler);
        }

        private void organizationFilter_TextChanged(object sender, TextChangedEventArgs e)
        {
        }

        private void departmentFilter_TextChanged(object sender, TextChangedEventArgs e)
        {
        }

		private void OnKeyDownHandler(object sender, KeyEventArgs e)
		{
			if (e.Key == Key.Enter && Keyboard.Modifiers == ModifierKeys.Control)
			{
				if (jobValidTextBox.IsFocused)
					jobButton.Command.Execute(null);
			}
		}

		private void Window_Loaded(object sender, RoutedEventArgs e)
		{
			Keyboard.Focus(validationTextBox);
		}
    }
}
